package com.ss.android.article.browser.c;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;

public final class a {
    private static final ThreadLocal<SimpleDateFormat> a;
    private static ThreadLocal<SimpleDateFormat> b;

    static {
        new b();
        a = new c();
        b = new ThreadLocal();
    }

    public static String a(long arg2) {
        return a.get().format(Long.valueOf(arg2));
    }

    private static SimpleDateFormat a() {
        if (b.get() == null) {
            b.set(new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA));
        }

        return b.get();
    }

    public static boolean a(String arg7) throws ParseException {
        int v6 = 6;
        boolean v0 = true;
        Calendar v1 = Calendar.getInstance();
        v1.setTime(new Date(System.currentTimeMillis()));
        Calendar v2 = Calendar.getInstance();
        v2.setTime(a().parse(arg7));
        if (v2.get(1) != v1.get(1) || v2.get(v6) - v1.get(v6) != 0) {
            v0 = false;
        }

        return v0;
    }

    public static boolean b(String arg7) throws ParseException {
        int v6 = 6;
        boolean v0 = true;
        Calendar v1 = Calendar.getInstance();
        v1.setTime(new Date(System.currentTimeMillis()));
        Calendar v2 = Calendar.getInstance();
        v2.setTime(a().parse(arg7));
        if (v2.get(1) != v1.get(1) || v2.get(v6) - v1.get(v6) != -1) {
            v0 = false;
        }

        return v0;
    }
}

